package chai.ning.cs.chars;

public class CharSequenceTest {

	public static void main(String[] args) {
		
		char[] chars = { '不' , '破' , '楼' , '兰' , '终' , '不' , '还' };
		
		CharSequence cs = new Characters( chars );
		System.out.println( cs ); // cs.toString()
		chars[ 2 ] = '隆' ;
		System.out.println( cs ); // cs.toString()
		
		System.out.println( cs.length() );
		
		for( int x = 0 , n = cs.length() ; x < n ; x++ ) {
			char ch = cs.charAt( x );
			System.out.println( ch );
		}
		
		CharSequence x = cs.subSequence( 4 ,  7 );
		System.out.println( x );
		
	}

}
